///
/// ArmyBodger 3
/// (c)2010 richyp
///
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ArmyBodger.Core {
    /// <summary>
    /// Represents a Game System
    /// </summary>
    public class GameSystemCollection : List<GameSystem> {
        /// <summary>
        /// Indexer to get the Game System by name
        /// </summary>
        /// <param name="name">Name of the GameSystem to retrieve</param>
        /// <returns>The GameSystem object or null</returns>
        public GameSystem this[string name] {
            get {
                foreach (GameSystem gs in this) {
                    if (gs.Header.Name == name) {
                        return gs;
                    }
                }
                return null;
            }
        }
    }
}
